home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 8554 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  958 b 

  1. Path: Belgium.EU.net!box!pahint
  2. From: pahint@eunet.be (Pieter Hintjens)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Efficient Sorting - In search of
  5. Date: 29 Feb 1996 18:33:00 GMT
  6. Organization: EUnet Belgium, Leuven, Belgium
  7. Message-ID: <4h4rgs$f8l@news.Belgium.EU.net>
  8. References: <4h4imh$3bh@news.cis.nctu.edu.tw>
  9. NNTP-Posting-Host: box.eunet.be
  10. X-Newsreader: TIN [version 1.2 PL2]
  11.  
  12. Don Pierce (don@pierce.geometrics.com) wrote:
  13. : I am looking for an efficient sorting algorithm
  14. : that can sort an array of floats. I prefer
  15. : a non-recursive version as I have heard they are
  16. : not very efficient on large data sets. My arrays
  17. : are up 10000 elements.
  18.  
  19. Try the COMB SORT algorithm.  This is basically a
  20. bubble sort, with a one line change that brings it
  21. up to the same kind of speed as quicksort.
  22.  
  23. I'd give you the algorithm in code, but my version
  24. is in COBOL, and this is a C newsgroup...  ;-)
  25.  
  26. Oops, my mistake - it's a *two* line change.
  27. --
  28. Pieter A. Hintjens
  29.